package com.inspection.controller.sys;

import com.inspection.model.dto.SysMenuQueryDTO;
import com.inspection.service.SysMenuService;
import com.inspection.support.Wrapper;
import com.inspection.support.model.MenuDataTree;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhaoqi
 * @since 2021-01-03
 */
@RestController
public class InitController {

    @Autowired
    private SysMenuService sysMenuService;


    @RequestMapping("/init/menu")
    public Wrapper<MenuDataTree> menuManager(@RequestBody SysMenuQueryDTO query) {
        return Wrapper.ok(sysMenuService.getMenuManagerTree());
    }
}
